package com.ws.lv.service.impl;

import com.ws.lv.bean.Supplier;
import com.ws.lv.mapper.SupplierMapper;
import com.ws.lv.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SupplierServiceImpl implements SupplierService {
    @Autowired
    SupplierMapper supplierMapper;

    @Override
    public List<Supplier> selectSupplierAll() {
        return supplierMapper.selectSupplierAll();
    }

    @Override
    public List<Supplier> selectSuppliers(String supplier_name) {
        return supplierMapper.selectSuppliers(supplier_name);
    }

    @Override
    public int insertSupplier(Supplier supplier) {
        return supplierMapper.insertSupplier(supplier);
    }

    @Override
    public Supplier selectSupplierById(Integer supplier_id) {
        return supplierMapper.selectSupplierById(supplier_id);
    }

    @Override
    public int updateSupplier(Supplier supplier) {
        return supplierMapper.updateSupplier(supplier);
    }

    @Override
    public int deleteSupplierById(Integer supplier_id) {
        return supplierMapper.deleteSupplierById(supplier_id);
    }

    @Override
    public int deleteSuppliers(ArrayList<Integer> supplier_ids) {
        return supplierMapper.deleteSuppliers(supplier_ids);
    }
}
